package com.wly.ui.panel
{
	import com.wly.PanelManager;
	
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.events.MouseEvent;
	
	public class StageFailedPanel extends MovieClip
	{
		private var _btnOK:SimpleButton;
		public var okCallBack:Function;
		
		public function StageFailedPanel()
		{
			super();
			_btnOK = getChildByName("btnOK") as SimpleButton;
			_btnOK.addEventListener(MouseEvent.CLICK, onOK);
		}
		
		public function onOK(e:MouseEvent):void
		{
			if(okCallBack != null)
			{
				PanelManager.getInstance().removePanel(this);
				okCallBack();
			}
		}
	}
}